package main

import "fmt"

type Person struct {
	name string
	age  int
}

func (person Person) speek() {
	fmt.Println(person.name, person.age)
}

func (person Person) cal(n1, n2 int) int {
	res := 0
	for i := n1; i <= n2; i++ {
		res += i
	}
	return res
}
func main() {
	person := Person{"jack", 18}
	person.speek()
	res := person.cal(1, 100)
	fmt.Println(res)
}
